home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xmu / widgetnode.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  94 lines

  1. /*
  2.  * $XConsortium: WidgetNode.h,v 1.7 91/07/22 23:46:16 converse Exp $
  3.  *
  4.  * Copyright 1990 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Jim Fulton, MIT X Consortium
  24.  */
  25.  
  26. #ifndef _XmuWidgetNode_h
  27. #define _XmuWidgetNode_h
  28.  
  29. #include <X11/Xfuncproto.h>
  30.  
  31. /*
  32.  * This is usually initialized by setting the first two fields and letting
  33.  * rest be implicitly nulled (by genlist.sh, for example)
  34.  */
  35. typedef struct _XmuWidgetNode {
  36.     char *label;            /* mixed case name */
  37.     WidgetClass *widget_class_ptr;    /* addr of widget class */
  38.     struct _XmuWidgetNode *superclass;    /* superclass of widget_class */
  39.     struct _XmuWidgetNode *children, *siblings;    /* subclass links */
  40.     char *lowered_label;        /* lowercase version of label */
  41.     char *lowered_classname;        /* lowercase version of class_name */
  42.     Bool have_resources;        /* resources have been fetched */
  43.     XtResourceList resources;        /* extracted resource database */
  44.     struct _XmuWidgetNode **resourcewn;    /* where resources come from */
  45.     Cardinal nresources;        /* number of resources */
  46.     XtResourceList constraints;        /* extracted constraint resources */
  47.     struct _XmuWidgetNode **constraintwn;  /* where constraints come from */
  48.     Cardinal nconstraints;        /* number of constraint resources */
  49.     XtPointer data;            /* extra data */
  50. } XmuWidgetNode;
  51.  
  52. #define XmuWnClass(wn) ((wn)->widget_class_ptr[0])
  53. #define XmuWnClassname(wn) (XmuWnClass(wn)->core_class.class_name)
  54. #define XmuWnSuperclass(wn) ((XmuWnClass(wn))->core_class.superclass)
  55.  
  56.                     /* external interfaces */
  57. _XFUNCPROTOBEGIN
  58.  
  59. extern void XmuWnInitializeNodes (
  60. #if NeedFunctionPrototypes
  61.     XmuWidgetNode *    /* nodearray */,
  62.     int            /* nnodes */
  63. #endif
  64. );
  65.  
  66. extern void XmuWnFetchResources (
  67. #if NeedFunctionPrototypes
  68.     XmuWidgetNode *    /* node */,
  69.     Widget        /* toplevel */,
  70.     XmuWidgetNode *    /* topnode */
  71. #endif
  72. );
  73.  
  74. extern int XmuWnCountOwnedResources (
  75. #if NeedFunctionPrototypes
  76.     XmuWidgetNode *    /* node */,
  77.     XmuWidgetNode *    /* ownernode */,
  78.     Bool        /* constraints */
  79. #endif
  80. );
  81.  
  82. extern XmuWidgetNode *XmuWnNameToNode (
  83. #if NeedFunctionPrototypes
  84.     XmuWidgetNode *    /* nodelist */,
  85.     int            /* nnodes */,
  86.     _Xconst char *    /* name */
  87. #endif
  88. );
  89.  
  90. _XFUNCPROTOEND
  91.  
  92. #endif /* _XmuWidgetNode_h */
  93.  
  94.